home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw GX / Programming Stuff / GX Libraries / LayoutEditLibrary.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-31  |  4.5 KB  |  177 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        LayoutEditLibrary.h
  3.  
  4.     Contains:    layout edit library interfaces: a Simple layout editing based on the TextEdit model
  5.  
  6.     Written by:    Dave Opstad, Eric Mader
  7.     
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <2>     1/24/95    JD        updated to latest GX 1.1 source (as of 16 Jan 1995)
  13.          <1>      1/9/95    JD        First checked in.
  14. */
  15.  
  16. #ifndef __LAYOUTEDITLIBRARY__
  17. #define __LAYOUTEDITLIBRARY__
  18.  
  19. #include <Types.h>
  20. #include <Memory.h>
  21. #include <GXTypes.h>
  22. #include "SelectionLibrary.h"
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. /* for compatibility with old headers */
  29. #define layoutEditLibraryIncludes
  30.  
  31. typedef Handle LayoutEditHandle;
  32.  
  33. LayoutEditHandle NewLayoutEditHandle(
  34.   long textRunCount,
  35.   const short textRunLengths[],
  36.   const void *text[],
  37.   long styleRunCount,
  38.   const short styleRunLengths[],
  39.   const gxStyle styles[],
  40.   long levelRunCount,
  41.   const short levelRunLengths[],
  42.   const short levels[],
  43.   gxLayoutOptions *layoutOptions,
  44.   gxPoint *position,
  45.   gxStyle defaultStyle);
  46.  
  47. LayoutEditHandle LayoutEditHandleFromLayout(gxShape layout);
  48.  
  49. long GetLayoutEditHandle(
  50.   LayoutEditHandle handle,
  51.   void *text,
  52.   long *styleRunCount,
  53.   short styleRunLengths[],
  54.   gxStyle styles[],
  55.   long *levelRunCount,
  56.   short levelRunLengths[],
  57.   short levels[],
  58.   gxLayoutOptions *layoutOptions,
  59.   gxPoint *position);
  60.  
  61. void SetLayoutEditHandle(
  62.   LayoutEditHandle handle,
  63.   long textRunCount,
  64.   const short textRunLengths[],
  65.   const void *text[],
  66.   long styleRunCount,
  67.   const short styleRunLengths[],
  68.   const gxStyle styles[],
  69.   long levelRunCount,
  70.   const short levelRunLengths[],
  71.   const short levels[],
  72.   const gxLayoutOptions *layoutOptions,
  73.   const gxPoint *position);
  74.  
  75. void SetLayoutEditHandleParts(
  76.   LayoutEditHandle handle,
  77.   gxByteOffset oldStartOffset,
  78.   gxByteOffset oldEndOffset,
  79.   long newTextRunCount,
  80.   const short newTextRunLengths[],
  81.   const void *newText[],
  82.   long newStyleRunCount,
  83.   const short newStyleRunLengths[],
  84.   const gxStyle newStyles[],
  85.   long newLevelRunCount,
  86.   const short newLevelRunLengths[],
  87.   const short newLevels[]);
  88.  
  89. void SetLayoutEditHandleSelectedParts(
  90.   LayoutEditHandle handle,
  91.   long newTextRunCount,
  92.   const short newTextRunLengths[],
  93.   const void *newText[],
  94.   long newStyleRunCount,
  95.   const short newStyleRunLengths[],
  96.   const gxStyle newStyles[],
  97.   long newLevelRunCount,
  98.   const short newLevelRunLengths[],
  99.   const short newLevels[]);
  100.  
  101. void SetLayoutEditHandleShapeParts(
  102.   LayoutEditHandle handle,
  103.   gxByteOffset startOffset,
  104.   gxByteOffset endOffset,
  105.   gxShape insert);
  106.  
  107. long GetLayoutEditHandleParts(
  108.   LayoutEditHandle handle,
  109.   gxByteOffset startOffset,
  110.   gxByteOffset endOffset,
  111.   void *text,
  112.   long *styleRunCount,
  113.   short styleRunLengths[],
  114.   gxStyle styles[],
  115.   long *levelRunCount,
  116.   short levelRunLengths[],
  117.   short levels[]);
  118.  
  119. long GetLayoutEditHandleSelectedParts(
  120.   LayoutEditHandle handle,
  121.   void *text,
  122.   long *styleRunCount,
  123.   short styleRunLengths[],
  124.   gxStyle styles[],
  125.   long *levelRunCount,
  126.   short levelRunLengths[],
  127.   short levels[]);
  128.  
  129. gxShape GetLayoutEditHandleShapeParts(
  130.   LayoutEditHandle handle,
  131.   gxByteOffset startOffset,
  132.   gxByteOffset endOffset,
  133.   gxShape dest);
  134.  
  135. void LayoutEditRotateShape(LayoutEditHandle handle, Fixed degrees, Fixed translateX, Fixed translateY);
  136.     
  137. void LayoutEditIdle(LayoutEditHandle handle);
  138.  
  139. void LayoutEditClick(LayoutEditHandle handle, gxPoint hitDown, Boolean extend);
  140.  
  141. void LayoutEditActivate(LayoutEditHandle handle);
  142.  
  143. void LayoutEditDeactivate(LayoutEditHandle handle);
  144.  
  145. void LayoutEditKey(LayoutEditHandle handle, char key);
  146.  
  147. void LayoutEditUpdate(LayoutEditHandle handle);
  148.  
  149. SelectionHandle LayoutEditGetSelection(LayoutEditHandle handle);
  150.  
  151. void LayoutEditSetSelection(LayoutEditHandle handle, SelectionOffset start, SelectionOffset end);
  152.  
  153. void LayoutEditSetSelectionHandle(LayoutEditHandle handle, SelectionHandle selection);
  154.  
  155. gxViewPort GetLayoutEditViewPort(LayoutEditHandle handle);
  156.  
  157. void LayoutEditSetStyle(LayoutEditHandle handle, gxStyle newStyle);
  158. void LayoutEditIncrementLevel(LayoutEditHandle handle);
  159. void LayoutEditDecrementLevel(LayoutEditHandle handle);
  160. void LayoutEditSetLevel(LayoutEditHandle handle, long level);
  161.  
  162. void LayoutEditCut(LayoutEditHandle handle);
  163. void LayoutEditCopy(LayoutEditHandle handle);
  164. void LayoutEditPaste(LayoutEditHandle handle);
  165. void LayoutEditClear(LayoutEditHandle handle);
  166.  
  167. void LayoutEditFromScrap(LayoutEditHandle handle);
  168. void LayoutEditToScrap(LayoutEditHandle handle);
  169.  
  170. void DisposeLayoutEditHandle(LayoutEditHandle handle);
  171.  
  172. #ifdef __cplusplus
  173. }
  174. #endif
  175.  
  176. #endif /* __LAYOUTEDITLIBRARY__ */
  177.